<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page language="java" import="com.tjtt.common.utils.DateUtilsAll"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String mainid = request.getParameter("mainid");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">   
<html>
  <head>
   	<%@ include file="../jslib/jquerylib.jsp" %> 
	<link rel="stylesheet" type="text/css" href="<%=path %>/web/style/layout.css" />
    <script type="text/javascript" src="<%=path %>/jslib/jquery.validate.min.js"></script>
    <script type='text/javascript' src="<%=request.getContextPath() %>/jslib/My97DatePicker/WdatePicker.js"  defer="defer"></script>
    <script type='text/javascript' src="<%=request.getContextPath() %>/jslib/jquery.form.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath() %>/jslib/additional-methods.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/themes/default/easyui.css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/themes/icon.css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/demo.css" />
	<script type="text/javascript" src="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath() %>/jslib/lhgdialog/lhgcore.lhgdialog.min.js?skin=mac"></script>

    <c:if test="${requestScope.message!=null}">
		<script type="text/javascript">
 	 		     alert('<c:out value="${requestScope.message}"></c:out>');
 	 		     window.close();
 		</script>
	</c:if> 
	<style type="text/css">
 		body{
 			background:#ffffff; background-image:url(images/);
 			
 		}
   		html{
		    overflow-x: hidden;
			overflow-y: auto;
		}  	
		.formTableNew textarea{border: 1px solid #999;padding: 5px;width: 760px;-moz-border-radius: 3px;border-radius: 3px;margin-bottom: 5px;color: #666;background: url(../images/input_bg.gif) repeat-x top;}
   </style>	
 
  	<script type="text/javascript">
    	var stateValue="";
   		$(document).ready(function(){
		$("#gridTablejbxx").jqGrid({
					url:'<%=request.getContextPath()%>/shebeiguzhangAction!querySbguzhangList.action',
					datatype: "json",
					height: 250,
					width: 710, 
					autowidth: true, 
					colNames:['ID','报修部门','设备名称','设备编号','故障描述','故障时间','是否影响停机','维修负责人','工作进度','下一步计划','维修时长','维修费用'],
					colModel:[
							{name:'ID',index:'ID', width:60, key:true,hidden:true,hidedlg:true}, 
							{name:'BAOXIUBUMEN',index:'BAOXIUBUMEN', width:100},								
							{name:'EQUIPMENT_NAME',index:'EQUIPMENT_NAME', width:100},
							{name:'EQUIPMENT_NO',index:'EQUIPMENT_NO', width:100},
							{name:'GUZHANGMIAOSHU',index:'GUZHANGMIAOSHU', width:100},
							{name:'GUZHANGTIME',index:'GUZHANGTIME', width:100},
							{name:'SHIFOUTINGJI',index:'XUHAO', width:100},								
							{name:'WXFUZERENNAME',index:'WEIXIUTIME', width:100},
							{name:'GONGZUOJINDU',index:'GONGZUOJINDU', width:100},
							{name:'NEXTJIHUA',index:'NEXTJIHUA', width:100},
							{name:'WEIXIUSHICHANG',index:'WEIXIUSHICHANG', width:100},								
							{name:'WEIXIUFEIYONG',index:'WEIXIUFEIYONG', width:100}
					],   
				shrinkToFit:false,
				sortname:'id',
				sortorder:'desc',
				viewrecords:true,
				multiselect: true, // 是否显示复选框
				multiboxonly : true, 
				//gridview: true,  //提升速度
				rownumbers: true,//显示行号
				rownumWidth: 30, //行号的宽度
				rowNum:15,
				rowList:[15,20,50,200,500],
				toolbar: [false,"top"],
				loadComplete: function() {
					
				},
				jsonReader: {
					root:"rows",		// 数据行（默认为：rows）
					page: "page",  	// 当前页
					total: "total",  // 总页数
					records: "records",  // 总记录数
					repeatitems : false		// 设置成false，在后台设置值的时候，可以乱序。且并非每个值都得设
				},
				prmNames:{rows:"rows",page:"page",sort:"sidx",order:"sord",search:"search"},
				pager:"#gridPagerjbxx",
				caption: "基本信息"
			});
			
			
		$("#gridTablebxxx").jqGrid({
					url:'<%=request.getContextPath()%>/shebeiguzhangAction!querySbguzhangList.action',
					datatype: "json",
					height: 250,
					width: 710, 
					autowidth: true, 
					colNames:['ID','保修时间','是否质保期内','关键研发设备','进口设备','机损险'],
					colModel:[
							{name:'ID',index:'ID', width:60, key:true,hidden:true,hidedlg:true}, 
							{name:'WEIXIUTIME',index:'WEIXIUTIME', width:100},								
							{name:'SHIFOUBAOZHI',index:'SHIFOUBAOZHI', width:150},
							{name:'EQUIPMENT_GJYFSB',index:'EQUIPMENT_GJYFSB', width:150},
							{name:'EQUIPMENT_JKSB',index:'EQUIPMENT_JKSB', width:200},
							{name:'EQUIPMENT_JSX',index:'EQUIPMENT_JSX', width:200}
					],   
				shrinkToFit:false,
				sortname:'id',
				sortorder:'desc',
				viewrecords:true,
				multiselect: true, // 是否显示复选框
				multiboxonly : true, 
				//gridview: true,  //提升速度
				rownumbers: true,//显示行号
				rownumWidth: 30, //行号的宽度
				rowNum:15,
				rowList:[15,20,50,200,500],
				toolbar: [false,"top"],
				loadComplete: function() {
					
				},
				jsonReader: {
					root:"rows",		// 数据行（默认为：rows）
					page: "page",  	// 当前页
					total: "total",  // 总页数
					records: "records",  // 总记录数
					repeatitems : false		// 设置成false，在后台设置值的时候，可以乱序。且并非每个值都得设
				},
				prmNames:{rows:"rows",page:"page",sort:"sidx",order:"sord",search:"search"},
				pager:"#gridPagerbxxx",
				caption: "报修信息"
			});
			
			
		$("#gridTablewxjl").jqGrid({
					url:'<%=request.getContextPath()%>/shebeiguzhangAction!querySbguzhangList.action',
					datatype: "json",
					height: 250,
					width: 710, 
					autowidth: true, 
					colNames:['ID','故障等级','故障性质','真因分析','维修方法','维修方式','委外维修费用','委外备件费用','备件更换情况','库存备件更换明细','库存备件费用','预防措施','维修建议'],
					colModel:[
							{name:'ID',index:'ID', width:60, key:true,hidden:true,hidedlg:true}, 
							{name:'GUZHANGDENGJI',index:'GUZHANGDENGJI', width:100},								
							{name:'GUZHANGXINGZHI',index:'GUZHANGXINGZHI', width:100},
							{name:'YUANYINFENXI',index:'YUANYINFENXI', width:100},
							{name:'WEIXIUFANGFA',index:'WEIXIUFANGFA', width:100},
							{name:'WEIXIUFANGFAX',index:'WEIXIUFANGFAX', width:100},								
							{name:'WEIWAIFEIYONG',index:'WEIWAIFEIYONG', width:100},
							{name:'WEIWAIBEIJIANFY',index:'WEIWAIBEIJIANFY', width:100},
							{name:'BJGHMINGXI',index:'BJGHMINGXI', width:100},
							{name:'EP_NAME',index:'EP_NAME', width:100},								
							{name:'BEIJANFEIYONG',index:'BEIJANFEIYONG', width:100},
							{name:'YUFANGCUOSHI',index:'YUFANGCUOSHI', width:100},
							{name:'WEIXIUJIANYI',index:'WEIXIUJIANYI', width:100}
					],   
				shrinkToFit:false,
				sortname:'id',
				sortorder:'desc',
				viewrecords:true,
				multiselect: true, // 是否显示复选框
				multiboxonly : true, 
				//gridview: true,  //提升速度
				rownumbers: true,//显示行号
				rownumWidth: 30, //行号的宽度
				rowNum:15,
				rowList:[15,20,50,200,500],
				toolbar: [false,"top"],
				loadComplete: function() {
					
				},
				jsonReader: {
					root:"rows",		// 数据行（默认为：rows）
					page: "page",  	// 当前页
					total: "total",  // 总页数
					records: "records",  // 总记录数
					repeatitems : false		// 设置成false，在后台设置值的时候，可以乱序。且并非每个值都得设
				},
				prmNames:{rows:"rows",page:"page",sort:"sidx",order:"sord",search:"search"},
				pager:"#gridPagerwxjl",
				caption: "维修记录"
			});
			
			
		$("#gridTablesybmqr").jqGrid({
					url:'<%=request.getContextPath()%>/shebeiguzhangAction!querySbguzhangList.action',
					datatype: "json",
					height: 250,
					width: 710, 
					autowidth: true, 
					colNames:['ID','验证方法','验证结果','验证时间'],
					colModel:[
							{name:'ID',index:'ID', width:60, key:true,hidden:true,hidedlg:true}, 
							{name:'YANZHENGFANGFA',index:'YANZHENGFANGFA', width:200},								
							{name:'YANZHENGJIEGUO',index:'YANZHENGJIEGUO', width:200},
							{name:'BAOQUERENTIME',index:'BAOQUERENTIME', width:200}
					],   
				shrinkToFit:false,
				sortname:'id',
				sortorder:'desc',
				viewrecords:true,
				multiselect: true, // 是否显示复选框
				multiboxonly : true, 
				//gridview: true,  //提升速度
				rownumbers: true,//显示行号
				rownumWidth: 30, //行号的宽度
				rowNum:15,
				rowList:[15,20,50,200,500],
				toolbar: [false,"top"],
				loadComplete: function() {
					
				},
				jsonReader: {
					root:"rows",		// 数据行（默认为：rows）
					page: "page",  	// 当前页
					total: "total",  // 总页数
					records: "records",  // 总记录数
					repeatitems : false		// 设置成false，在后台设置值的时候，可以乱序。且并非每个值都得设
				},
				prmNames:{rows:"rows",page:"page",sort:"sidx",order:"sord",search:"search"},
				pager:"#gridPagersybmqr",
				caption: "使用部门领导确认"
			});
			
			
		$("#gridTablezbldqr").jqGrid({
					url:'<%=request.getContextPath()%>/shebeiguzhangAction!querySbguzhangList.action',
					datatype: "json",
					height: 250,
					width: 710, 
					autowidth: true, 
					colNames:['ID','故障停机时间','领导批示','确认时间'],
					colModel:[
							{name:'ID',index:'ID', width:60, key:true,hidden:true,hidedlg:true}, 
							{name:'GZTINGJITIME',index:'GZTINGJITIME', width:200},								
							{name:'ZBLDYIJIAN',index:'ZBLDYIJIAN', width:200},
							{name:'ZBLDQUERENTIME',index:'ZBLDQUERENTIME', width:200}
					],   
				shrinkToFit:false,
				sortname:'id',
				sortorder:'desc',
				viewrecords:true,
				multiselect: true, // 是否显示复选框
				multiboxonly : true, 
				//gridview: true,  //提升速度
				rownumbers: true,//显示行号
				rownumWidth: 30, //行号的宽度
				rowNum:15,
				rowList:[15,20,50,200,500],
				toolbar: [false,"top"],
				loadComplete: function() {
					
				},
				jsonReader: {
					root:"rows",		// 数据行（默认为：rows）
					page: "page",  	// 当前页
					total: "total",  // 总页数
					records: "records",  // 总记录数
					repeatitems : false		// 设置成false，在后台设置值的时候，可以乱序。且并非每个值都得设
				},
				prmNames:{rows:"rows",page:"page",sort:"sidx",order:"sord",search:"search"},
				pager:"#gridPagerzbldqr",
				caption: "装备领导确认"
			});
			doResize();
			
		});
		
		function doResize() { 
		var ss = getPageSize(); 
		//alert(ss.WinH);
		
			 $("#gridTablejbxx").jqGrid('setGridHeight', ss.WinH-245);
			 $("#gridTablejbxx").jqGrid('setGridWidth', ss.WinW-30); 
			 $("#gridTablebxxx").jqGrid('setGridHeight', ss.WinH-245);
			 $("#gridTablebxxx").jqGrid('setGridWidth', ss.WinW-30);
			 $("#gridTablewxjl").jqGrid('setGridHeight', ss.WinH-245);
			 $("#gridTablewxjl").jqGrid('setGridWidth', ss.WinW-30);
			 $("#gridTablesybmqr").jqGrid('setGridHeight', ss.WinH-245);
			 $("#gridTablesybmqr").jqGrid('setGridWidth', ss.WinW-30);
			 $("#gridTablezbldqr").jqGrid('setGridHeight', ss.WinH-245);
			 $("#gridTablezbldqr").jqGrid('setGridWidth', ss.WinW-30); 
	} 
  	</script>
   </head>
  <body>
    <form id="pageFrom" action="" enctype="multipart/form-data" method="post">
    	 <input type="hidden" id="flag" name="flag" />
        <input type="hidden" name="flowid" id="flowid" value="${flowid}" />
     	<input type="hidden" name="stateid" id="stateid" value="${stateid}" />
     	${steptcontent}
     	<input type="hidden" id="taskinfoid" name="taskinfoid" value="${taskinfoid}" />
  		<table width="100%" border="0" align="center" cellpadding="5" cellspacing="5" class="formTableNew">
  			<tr>
  				<td colspan='4' align='center'>
			      <div id='tt1' class='easyui-tabs' style="width: 1024px;height: 700px;">
			        <div title='基本信息'>
	                  <table id="gridTablejbxx"></table>
	                  <div id="gridPagerjbxx"></div>
	                </div>
	                <div title='报修信息'>
	                  <table id="gridTablebxxx"></table>
	                  <div id="gridPagerbxxx"></div>
	                </div>
					 <div title='维修记录'>
					   <table id="gridTablewxjl"></table>
	                   <div id="gridPagerwxjl"></div>
					 </div>
					 <div title='使用部门确认'>
					 	<table id="gridTablesybmqr"></table>
	                    <div id="gridPagersybmqr"></div>
					 </div>
	                 <div title='装备领导确认'>
	                 	<table id="gridTablezbldqr"></table>
	                    <div id="gridPagerzbldqr"></div>
					 </div>
				</div>
			  </td>
			</tr>
		</table>
	<!--表单结束-->
	</form>
  </body>
</html>
